package com.joysuch.wwyt.bp.bean.inspect;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class BpInspectRecordDetailBean {

    @ApiModelProperty("检查记录表id-新增时无需传值")
    private Long inspectRecordPointId;

    @ApiModelProperty("检查点ID")
    @NotNull(message = "检查点Id不能为空")
    private Long inspectPointId;

    @ApiModelProperty("检查开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@NotNull(message = "检查开始时间不能为空")
    //@Past(message = "请正确填写检查开始时间")
    private LocalDateTime inspectStartTime;

    @ApiModelProperty("检查完成时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@NotNull(message = "检查完成时间不能为空")
    private LocalDateTime inspectFinishTime;

    @ApiModelProperty("检查点位置异常，异常情况填写: '位置异常'，正常情况无需填写")
    private String locationException;

    @ApiModelProperty("检查点detail")
    @Valid
    private List<BpInspectRecordPointDetailBean> pointDetails;
}
